#pragma once
#include <stdint.h>

// 按键状态
typedef struct BPHandleButton
{
    /*
	* robot system power control
	* power off request source:
	*    1, button panel:power button press for 3 seconds
	*	 2, remote power off input: on for 3seconds
	*    3, APP power off request
	* power is controled by SCB, only zuc controller request power off,SCB will perform power off operation 
 	*/
    uint8_t bp_power_cab_on_off;
    /*
	 * press for 3 seconds <==> 6 beeps  
     * when unlock button panel is uasable
     * */
    uint8_t bp_lock_on_off;
    /*
     * robot control command
     * command will be rising/falling edges
     * deal by the cab control software
     * */
    uint8_t bp_power_robot_on_off;
    uint8_t bp_en_robot_on_off;
    /* the running robot stop in the current position when button pressed
	* the stopped robot runs from the current position follwing the loaded program
	*/
    uint8_t bp_run_stop_on_off;
    /*
	* press to load the default program for the enabled robot,
	* start the program from the init position
	* re-press to terminate the loaded program 
	*/
    uint8_t bp_pause_resume_on_off;

    uint8_t bp_return_init_on_off;
} BPHandleButton;

typedef enum ControlHandleColor
{
    ZUC_BP_RGB_OFF = 0,
    ZUC_BP_RGB_RED,
    ZUC_BP_RGB_GREEN,
    ZUC_BP_RGB_BLUE,
    ZUC_BP_RGB_WHITE,
    ZUC_BP_RGB_YELLOW,
    ZUC_BP_RGB_FUCHSIA,
    ZUC_BP_RGB_CYAN
} ControlHandleColor;

// 手柄状态
typedef struct ControlHanldeStatus
{
    ControlHandleColor bp_rgb_lock_color;
    uint8_t bp_rgb_lock_brightness;  // 范围0-100
    ControlHandleColor bp_rgb_logol_color;
    uint8_t bp_rgb_logol_brightness;  // 范围0-100
    uint8_t bp_beep;
    uint8_t heartbeat;
    uint8_t reserve_1;
    uint8_t reserve_2;
} ControlHanldeStatus;